package org.deltaset.meta.internal;

/**
 *
 * @author dmakariev
 */
public class MetaActionImpl<T> {

    private final String id;
    private final MetaClassImpl parentMetaClass;
    private final MetaClassImpl parameterMetaClass;
    private final MetaClassImpl returnMetaClass;
    private final boolean isEmpty;
    private final T detail;

    public MetaActionImpl(
            String id,
            MetaClassImpl parentMetaClass,
            MetaClassImpl parameterMetaClass,
            MetaClassImpl returnMetaClass,
            boolean isEmpty,
            T detail) {
        this.id = id;
        this.parentMetaClass = parentMetaClass;
        this.parameterMetaClass = parameterMetaClass;
        this.returnMetaClass = returnMetaClass;
        this.isEmpty = isEmpty;
        this.detail = detail;
    }

    public String getId() {
        return id;
    }

    public MetaClassImpl getParameterMetaClass() {
        return parameterMetaClass;
    }

    public MetaClassImpl getParentMetaClass() {
        return parentMetaClass;
    }

    public MetaClassImpl getReturnMetaClass() {
        return returnMetaClass;
    }

    public T getDetail() {
        return detail;
    }

    public Class getDetailClass() {
        return detail.getClass();
    }

    public boolean isEmpty() {
        return isEmpty;
    }
}
